import pickle as pkl

from utils.utils import isletter
from dataset.CMN_dataset import CMNDataset
from models.DPCNN import Config, Model

lin = ' fan'
print(lin.split(' '))
'''
config = Config()
model = Model(config)
dataset = CMNDataset(config, 'train')
print(dataset[1])
print(model(dataset[1][0]))
from utils.load_w2v_model import load_w2v_model
from utils.build.embedding_matrix import build_embedding_matrix
vocab_dic = pkl.load(open('./source/vocab/vocab.pkl', 'rb'))
word2vector = load_w2v_model('w2v_with_cut_d100_20200727_112207')
keys = list(vocab_dic.keys())
values = list(vocab_dic.values())
idx = values.index(13355)
key = keys[idx]
print(key)
print(word2vector.wv[key])

'''

'''
from utils.build.vocab import main
#main('./source/data/js_pd_seg_merge.txt', './source/vocab/vocab.pkl')
from utils.load_w2v_model import load_w2v_model
from utils.build.embedding_matrix import build_embedding_matrix
vocab_dic = pkl.load(open('./source/vocab/vocab.pkl', 'rb'))
word2vector = load_w2v_model('w2v_with_cut_d100_20200727_112207')
print(build_embedding_matrix(vocab_dic, word2vector))
'''